import request from '@/utils/request'

export function fetchList(query) {
    return request({
        url: '/${cfg.module}/coding/${table.entityPath}/myPage',
        method: 'GET',
        params: query
    })
}

<#if cfg.isTreeTable == true>
export function treeApi(query) {
    return request({
        url: '/${cfg.module}/coding/${table.entityPath}/tree',
        method: 'GET',
        params: query
    })
}
</#if>

export function createApi(data) {
    return request({
        url: '/${cfg.module}/coding/${table.entityPath}/create',
        method: 'POST',
        data
    })
}

export function updateApi(data) {
    return request({
        url: '/${cfg.module}/coding/${table.entityPath}/update',
        method: 'POST',
        data
    })
}

export function deleteApi(params) {
    return request({
        url: '/${cfg.module}/coding/${table.entityPath}/delete',
        method: 'POST',
        params
    })
}

